package com.wyix.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 课程信息DTO
 *
 * @author wangdx
 * @since 2025/8/28
 */
@Data
@Schema(description = "课程信息DTO")
public class CourseDTO {
    private Long id;

    @NotBlank(message = "课程编号不能为空")
    @Schema(description = "课程编号", example = "C001")
    private String courseNo;

    @NotBlank(message = "课程名称不能为空")
    @Schema(description = "课程名称", example = "Java编程")
    private String courseName;

    @NotBlank(message = "授课老师不能为空")
    @Schema(description = "授课老师", example = "张教授")
    private String teacher;

    @NotNull(message = "学分不能为空")
    @DecimalMin(value = "0.5", message = "学分不能小于0.5")
    @Schema(description = "学分", example = "3.0")
    private Double credit;
}
